* {
    padding: 0;
    margin: 0;
}

.box {
    position: relative;
    margin: 50px;
}

.box>.smallBox {
    width: 300px;
    height: 300px;
    border: black 1px solid;
}

.box>.smallBox>img {
    width: 100%;
}

.box>.smallBox>.mask {
    width: 100px;
    height: 100px;
    background-color: black;
    opacity: 0.3;
    position: absolute;
    z-index: 999;
    display: none;
}

.box>.smallBox:hover .mask {
    display: block;
}

.box>.bigBox {
    position: absolute;
    width: 300px;
    height: 300px;
    left: 300px;
    top: 0;
    border: 1px solid #000;
    overflow: hidden;
    display: none;
}

.box>.bigBox>img {
    width: 800px;
    height: 800px;
}

.box>.smallBox:hover .bigBox {
    display: inline-block;
}

.box>.bigBox>img {
    width: 800px;
    height: 800px;
}